/**
 * @(#)MaximumScoredNumber.java
 * 
 * TopCoder SRM 412 DIV 2 250 Point
 * 
 * Author:     GGshiney
 * Version : 
 * Date:       2008-7-31
 */
public class TrueSpace {
    private long clusterCounter = 0;

    public long calculateSpace(int[] sizes, int clusterSize) {

	for (int i = 0; i < sizes.length; i++) {
	    clusterCounter += sizes[i] / clusterSize;
	    if ((sizes[i] % clusterSize) != 0) {
		clusterCounter++;
	    }
	}
	return clusterCounter * clusterSize;
    }
}
